import VueRouter from 'vue-router';
import home from './component/Tabbar/HomeContainer.vue';
import goodsList from './component/Tabbar/GoodsRouter.vue';
import member from './component/Tabbar/MemberRouter.vue';
import person from './component/Tabbar/PersonRouter.vue';
import search from './component/Tabbar/SearchRouter.vue';
import newlist from './component/JiuGongGe/NewList.vue';
import newsinfo from './component/JiuGongGe/NewsInfo.vue';
import about from './component/Tabbar/Person/About.vue';
import discount from './component/Tabbar/Person/Discount.vue';
import qustion from './component/Tabbar/Person/Question.vue';
import quit from './component/Tabbar/Person/Quit.vue';
import password from './component/Tabbar/Person/Password.vue';
import photoInfo from './component/entryLink/photoList.vue';
import photoList from './component/entryLink/photoShare.vue';
import shopping from './component/entryLink/shopping.vue';
import goods from './component/entryLink/goods.vue';


// 3. 创建路由对象
var router = new VueRouter({
    routes: [
        {path: '/', redirect: '/home'},
        {path: '/home', component: home},
        {path: '/member', component: member},
        {path: '/goods', component: goodsList},
        {path: '/person', component: person},
        {path: '/search', component: search},
        {path: '/home/shopping', component: shopping},
        {path: '/home/goods', component: goods,name:'goods'},
        {path: '/home/photoList', component: photoList},
        {path: '/home/photoInfo/:id', component: photoInfo},
        {path: '/home/newList', component: newlist},
        {path: '/home/newsInfo/:id/:catId', component: newsinfo},
        {path: '/person/about', component: about},
        {path: '/person/discount', component: discount},
        {path: '/person/qustion', component: qustion},
        {path: '/person/quit', component: quit},
        {path: '/person/password', component: password},

    ],
    linkActiveClass:'mui-active'
});

// 把路由对象暴露出去
export default router